home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
sv12us.exe
/
SOUNDVIS
/
SOUNDVIS.CH
< prev
next >
Wrap
Text File
|
1993-07-26
|
10KB
|
207 lines
/******************************************************************
* TITLE SoundVis.ch *
* Include for SOUND & VISION for Clipper *
* *
* Example : SetPref ( C_BARCOL, 30 ) sets the color for the *
* menubar from 112 ( black on white , default) *
* to 30 (light-white on blue ) *
* *
* Copyright (c) 1993, Thomas Groeger *
* All rights reserved. *
* *
******************************************************************/
// definitions
#define A_TELEFON '╔╣' // 201 + 185
#define A_SANDGLASS '╗' // 189
#define A_LU '╘' // 212
#define A_RU '╙' // 211
#define A_UPPER '╟' // 199
#define A_BOTTOM '╚' // 200
#define A_SEP '─' // 196
#define A_HORIZONT '╨' // 208
#define A_VERTICAL 'Σ╧' // 228 + 207
#define A_EXITBOX '╦╡' // 203 + 181
#define A_ICONBOX '╠╖' // 204 + 183
#define A_CHOIBOX '═╕' // 205 + 184
#define A_RIGHTBOX '╦╢' // 203 + 182
#define A_LEFTBOX '╩╡' // 202 + 181
#define A_UPBOX '╥▓' // 210 + 178
#define A_DOWNBOX '╤▒' // 209 + 177
#define A_SCROLLBOX '██' // 219 + 219
// Return values of the menu functions
#define B_ESC 0
#define B_LEFT -1
#define B_RIGHT -2
#define B_QUIT -3
#define B_MOUSE -4
// Mouse return values when using AlertBox
#define M_CLOSE 0 // CloseButton
#define K_MOUSE 255 // MouseButton
#define M_MOVE 254 // MoveButton
#define M_CHOICE 253 // ButtonPressed ?
#define M_UP 252 // Scrollbar Top
#define M_DOWN 251 // Bottom
#define M_LEFT 250 // Left
#define M_RIGHT 249 // Right
// ArrayDimension for the Menu-Arrays
#define MEN_TEXT 1 // Dimension 1 = Text
#define MEN_RET 2 // Dimension 2 = Return-Code/Function
#define MEN_SEL 3 // Dimension 3 = Selected T/F
#define MEN_DESC 4 // Dimension 4 = Description
#define MEN_CUT 5 // Dim.PopUp 5 = ShortCut
#define MEN_SPACE 5 // Dim.Bar 5 = prompt distance
// ArrayDimension for the Mouse-Array
#define MS_ROW 1 // MouseRow 1
#define MS_LCOL 2 // Column left
#define MS_RCOL 3 // Column Right
#define MS_RET 4 // Return value/Function
// WindowConstants / Types of Windows
#define WIN_SINGLE 0 // single frame
#define WIN_MESSAGE 51 // GrafWindow with Close/Movebutton
#define WIN_LIST 59 // ListBox with ScrollBar without menue
#define WIN_FULL 63 // full Window: everything's in here
// Colordefinition for SetDAC ColorValue
#define C_N 0 // black
#define C_B 1 // blue
#define C_G 2 // green
#define C_BG 3 // cyan
#define C_R 4 // red
#define C_RB 5 // magenta
#define C_RG 6 // brown
#define C_W 7 // white
#define C_HN 8 // grey
#define C_HB 9 // shining blue
#define C_HG 10 // shining green
#define C_HBG 11 // light blue
#define C_HR 12 // shining red
#define C_HRB 13 // shining magenta
#define C_HRG 14 // yellow
#define C_HW 15 // shining white
// ColorDefinitions for SetLibCol
#define C_BARCOL 1 // MenuBar, default 240 - black on white+
#define C_BARKEY 2 // Hotkey 244 - red on white+
#define C_BARPASSIV 3 // non-chooseable 248 - grey on white+
#define C_BARPROMPT 4 // PromptColor 15 - +white on black
#define C_BARHOTKEY 5 // HotKeyColor 15 - +white on black
// PopUp-Menu
#define C_POPCOL 6 // Window/Text 48 - black on light blue
#define C_POPKEY 7 // Hotkeys 52 - red on light blue
#define C_POPPASSIV 8 // Choice not available 56 - grey on light blue
#define C_POPPROMPT 9 // Prompt 15 - light white on black
#define C_POPHOTKEY 10 // Prompt-Hotkey 10 - light green on black
#define C_POPSHORT 11 // ShortCuts in Menue 55 - white on light blue
// ColorDefinitions for OpenWin() / DataWindow
#define C_MASKWIN 12 // Window/FrameColor 112 - black on white
#define C_MASKMENU 13 // MenuBar 240 - black on white+
#define C_MASKHEAD 14 // Title 31 - +white on blue
#define C_MASKSYMB 15 // All Icons 7 - white on black
// AlertBoxes: TitleColor
#define C_BOXHEADER 16 // TitleColor 112 - black on white
// Question ? - Box
#define C_QUESTWIN 17 // QuestionBox 23 - white on blue
#define C_QUESTTEXT 18 // Text 30 - yellow on blue
#define C_QUESTBUTTEXT 19 // ButtonText 112 - black on white
#define C_QUESTBUTHOT 20 // ButtonHotkey 116 - red on white
// Attention ! - Box
#define C_ALERTWIN 21 // AlertBox 71 - white on red
#define C_ALERTTEXT 22 // MessageText 69 - yellow on red
#define C_ALERTBUTTEXT 23 // ButtonText 46 - yellow on green
#define C_ALERTBUTHOT 24 // ButtonHotkey 44 - red on green
// Message-Box
#define C_MESSWIN 25 // MessageBox 208 - black on purple
#define C_MESSTEXT 26 // MessageText 212 - red on purple
#define C_MESSBUTTEXT 27 // Button-Text 112 - black on white
#define C_MESSBUTHOT 28 // Button-Hotkey 116 - red on white
// Descript() - Row
#define C_DESCROW 29 // DispText-Row 24 - Row 24
#define C_DESCCOL 30 // DispText-Column 01 - Col 1
#define C_DESCEND 31 // EndColumn 79 - EndCol 79
// Button-Preferences
#define C_GRAFBUTTON 32 // GraficButtons 1 = Yes 2 = No
#define C_BUTTUPPER 33 // Upper Buttonline chr(200)
#define C_BUTTLOWER 34 // Lower Buttonline chr(199)
// Just a few tricks, using the PreProcessor :
// -------------------------------------------
#COMMAND @ <row>, <col> GET <var> ;
AS PUSHBUTTON <buttons> ;
[COLOR <color>] ;
[HOTKEY <nHot>] ;
[WHEN <when>] ;
[SEND <msg>] ;
[<vert: VERTIKAL>] ;
;
=> SetPos( <row>, <col> ) ;
; aAdd( GetList, _GET_( <var>, <(var)>, "9",, <{when}> ) ) ;
[; aTail(GetList):<msg>] ;
; ButtonView (<row>,<col>,<color>, <nHot> ,<buttons>,<.vert.>) ;
; aTail(getlist):reader :={|get|ReadaButton(get,<buttons>,<color>,<nHot>,<.vert.>)}
#command @ <row>, <col> GET <var> AS FRAME IN <col1>,<col2> ;
[PICTURE <pic>] ;
[VALID <valid>] ;
[WHEN <when>] ;
[SEND <msg>] ;
;
=> SetPos( <row>, <col> ) ;
; AAdd(GetList, _GET_( <var>, <(var)>, <pic>, <{valid}>, <{when}>):display() ) ;
; aTail(getList):reader:={|get|FrameReader(get,<col1>,<col2>,2)} ;
[; ATail(GetList):<msg>] ;
#COMMAND OPENWIN FROM <tRow>, <tCol> TO <bRow>, <bCol> ;
[TITLE <title> ] ;
[TOPCOLOR <TopCol>] ;
[WINCOLOR <WinCol>] ;
[TYP <WinTyp>] ;
SAVE TO <Buffer> ;
;
=> <Buffer> := OpenMask(<tRow>,<tCol>,<bRow>,<bCol>,<title>,<WinTyp>,<TopCol>,<WinCol>)
#COMMAND OPENWIN FROM <tRow>, <tCol> TO <bRow>, <bCol> ;
[TITLE <title> ] ;
[TOPCOLOR <TopCol>] ;
[WINCOLOR <WinCol>] ;
[TYP <WinTyp>] ;
;
=> OpenMask(<tRow>,<tCol>,<bRow>,<bCol>,<title>,<WinTyp>,<TopCol>,<WinCol>)